package com.qf.controller;

import com.qf.util.AliyunOSSUtil;
import com.qf.util.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 天--道--酬--勤
 *
 * @author LiangGaoQiang
 * @ClassName UploadController
 * @Date: 2025/5/1 16:03
 * @Description: 描述
 */

@RestController
public class UploadController {

    /**
     * 演示上传文件到OSS
     */
    @PostMapping("/upload")
    public R upload(MultipartFile file){
        String filePath = AliyunOSSUtil.upLoad(file);
        return R.ok(filePath);
    }
}
